<#include "/WEB-INF/default/fragment/temp.ftl">
<div id="main">
    <div align="center"><img src="./assets/image/logo.png" alt=""></div>
</div>
<div class="invit">
    <span>我的分组列表</span>
</div>
<div class="team-index">
    <div class="team-list">
        <table id="table" class="table table-hover">
            <thead>
                <tr align="center">
                    <th>分组名</th>
                    <th>团队名</th>
                    <th>分组描述</th>
                </tr>
            </thead>
            <tbody>

            </tbody>
        </table>
        <script type="text/javascript">
            $.ajax({
              url: '${request.contextPath}/pro_user_list.action',
              type: 'POST',
              dataType: 'text',
              data: {},
              complete: function(xhr, textStatus) {
                //called when complete
              },
              success: function(data, textStatus, xhr) {
                var da = JSON.parse(data);
                var tb = $('#table>tbody');
                var values = '<tr><td></td><td></td><td></td><td><div class="btns"><button id="invite" class="btn btn-info">成员管理</button><button class="btn btn-warning">修改</button></div></td></tr>';
                for(var i in da){
                    for(var val in da[i]){
                        tb.append(values);
                        $('#table>tbody>tr')
                    }
                }
              },
              error: function(xhr, textStatus, errorThrown) {
                //called when there is an error
              }
            });
            $('#invite').click(function(event) {
                window.location.href='#invite-view';
            });
            $('#table>tbody>tr').click(function(event) {
                window.location.href='#project-member';
            });
        </script>
    </div>
</div>
<#include "/WEB-INF/default/fragment/footer.ftl">